<head> 
<title>Proxy</title> 
<HTA:APPLICATION  
     APPLICATIONNAME="Proxy Enable or Disable" 
     SCROLL="no" 
     Icon = "proxy_server.ico" 
     SINGLEINSTANCE="yes" 
     WINDOWSTATE="normal" 
> 
</head> 
<script language="VBscript"> 
  window.resizeTo 300,150 
</script> 
         
<script language="VBScript"> 
Sub Window_onLoad 
Set objShell = CreateObject( "WScript.Shell" ) 
DimSetting = objShell.RegRead ("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable") 
'Wscript.Echo DimSetting 
If DimSetting = 1 Then  
'Wscript.Echo "Proxy is Enabled" 
DataArea.InnerHTML = "O Proxy Esta Ativo" 
DataArea0.InnerHTML = "<input style=WIDTH: 95; HEIGHT: 28 type=button value=Desativar name=run_button  onClick=NO>"     
Else  
'Wscript.Echo "Proxy is Disable" 
DataArea.InnerHTML = "O Proxy Esta Inativo" 
DataArea0.InnerHTML = "<input style=WIDTH: 91; HEIGHT: 28 type=button value=Ativar name=run_button  onClick=YES>"    
End If 
End Sub 
 
Sub YES 
Const HKEY_CURRENT_USER = &H80000001 
 
strComputer = "." 
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") 
  
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" 
 
strValueName = "ProxyEnable" 
dwValue = 1 
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue 
Location.Reload(True) 
 
 
End Sub 
 
Sub NO 
Const HKEY_CURRENT_USER = &H80000001 
 
strComputer = "." 
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") 
  
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" 
 
strValueName = "ProxyEnable" 
dwValue = 0 
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue 
Location.Reload(True)
 
End Sub 

Sub CancelScript
Set oShell = Nothing
Set objNetwork = Nothing
Self.Close()
End Sub 
 
</script> 
 
<body> 
<p align="center"> 
 
 

<p align="center"> <span id = "DataArea"></span> </p>  
<p align="center"> <span id = "DataArea0"></span>  &nbsp;&nbsp;&nbsp; <Input id=runbutton class="button" type="button" value="Fechar" name="cancel_button" onClick="CancelScript"></p> 

 
</body>